<%@ include file="/taglibs.jsp" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

<head>
	<title>北京邮电大学学生党员在线学习中心</title>
	
	<link type="text/css" rel="stylesheet" href="${ctx}/css/jquery-ui-1.8.16.custom.css" />
	<script type="text/javascript" src="${ctx}/scripts/jquery-1.6.2.js"></script>
	<script type="text/javascript" src="${ctx}/scripts/jquery-ui-1.8.16.custom.min.js"></script>
	<script type="text/javascript" src="${ctx}/scripts/jquery.ui.core.js"></script>
	<script type="text/javascript" src="${ctx}/scripts/jquery.ui.datepicker.js"></script>
	<script type="text/javascript">
		$(function() {
			$('#joinPartyDate').datepicker({ changeYear: true,changeMonth:true,yearRange: 'c-60:c+20'}); 
			
		});
	</script>

	<script type="text/javascript">
	String.prototype.trim = function()
	{
	  return this.replace(/(^\s*)|(\s*$)/g, "");
	}
	
	function check() {
		              
		   var adminGender = document.form1.adminGender.value.toString();//性别
		   var adminNationality = document.form1.adminNationality.value.toString();//民族
		   var telephone = document.form1.telephone.value.toString();//电话号码
		   var email = document.form1.email.value.toString();//邮箱
		   
		   
 	    	if(adminGender == 0) {
			       alert('请选择性别！');
			       document.form1.adminGender.focus();
			       return false;
			        
		   }else if(adminNationality==0){
			   alert('请选择民族!');
		       document.form1.adminNationality.focus();
		       return false;
		   }else if(telephone.length>60){
			   alert('电话号码字符长度不能超过60!');
		       document.form1.telephone.focus();
		       return false;
		   }else if(email.length>60){
			   alert('电子邮箱字符长度不能超过60!');
		       document.form1.email.focus();
		       return false;
		   }
	
		}
				
	
	</script>
	
</head>

<div id="nav_bar">
    <img id="nav_bar_left" src="../../../styles/nav_bar_left.png" alt=""/>
    <div id="welcome_label">欢迎您，&nbsp;<s:property value="#session.session_user.adminName" />!</div>
    <img id="nav_bar_seperator" src="../../../styles/nav_bar_seperator.png" alt=""/>
    <div id="nav_location">
        <img id="nav_bar_point" src="../../../styles/nav_bar_point.png" alt="" />
        <div id="nav_cur_location">当前位置：&nbsp;<a href="${ctx}/AdminAction_adminPersonCenter">个人中心</a>&nbsp;&nbsp;>&nbsp;&nbsp;<span style="color:black;">查改个人信息</span></div>
    </div>
    <img style="float:right; width:5px;" src="../../../styles/nav_bar_right.png" alt=""/>
    <a id="nav_logout" href="${ctx}/logoutAction_adminLogout">[安全退出]</a>
</div>
<div style="clear:both; height:5px;">&nbsp;</div>

<div style="min-height:450px;">
	<div id="side_menu">
	    <div id="side_menu_title">
	        <img src="../../../styles/side_menu_title_img.png" alt="" />
	        <span>个人中心</span>
	    </div>
	    <div id="side_menu_title_bottom">&nbsp;</div>
	    <div class="side_sub_menu_focus">
	        <div class="side_menu_point">&nbsp;</div>
	        <a href="${ctx}/AdminAction_adminInfo">查改个人信息</a>
	    </div>
	    <div class="side_menu_seperator">&nbsp;</div>
	    <div class="side_sub_menu">
	        <div class="side_menu_point">&nbsp;</div>
	        <a href="${ctx}/AdminAction_modifyAdminPassword">修改个人密码</a>
	    </div>
	    <div class="side_menu_seperator">&nbsp;</div>
	    <div class="side_sub_menu">
	        <div class="side_menu_point">&nbsp;</div>
	        <a href="${ctx}/AdminAction_personStudyStatistics">个人学习情况统计</a>
	    </div>
	    <div class="side_menu_seperator">&nbsp;</div>
	    <s:if test="#session.level == 2 || #session.level == 3">
	    <div class="side_sub_menu">
	        <div class="side_menu_point">&nbsp;</div>
	        <a href="${ctx}/AdminAction_branchStudyStatistics">党支部学习情况统计</a>
	    </div>
	    </s:if>
	    <s:if test="#session.level == 3">
	    <div class="side_menu_seperator">&nbsp;</div>
	    <div class="side_sub_menu">
	        <div class="side_menu_point">&nbsp;</div>
	        <a href="${ctx}/AdminAction_partyStudyStatistics">分党委学习情况统计</a>
	    </div>
	    </s:if>
	</div>
	
	<div id="main_content">
	    <div id="main_content_title">
	        <img src="../../../styles/content_title_img.png" alt="" />
	        <span>查改个人信息</span>
	    </div>
	    <div class="main_content_title_bottom">&nbsp;</div>
	    <s:form action="AdminAction_save_adminInfo" name="form1"  method="post" onsubmit="return check();">
		<table id="table" class="page_table" cellspacing="0" cellpadding="0" >
		<tr>
			<td class="leftTD">姓名:</td>
			<td class="rightTD"><s:property value="#request.admin.adminName"/>
				<input id="adminName" name="adminName" type="hidden" value='<s:property value="#request.admin.adminName"/>'  readonly="readonly"/>
			</td>
			
		</tr>
		<tr>
			<td class="leftTD2">学号:</td>
			<td><s:property value="#request.admin.adminNo"/>
			<input id="adminNO" name="adminNO" type="hidden"  value='<s:property value="#request.admin.adminNo"/>' readonly="readonly"/>
			</td>
		</tr>
		<tr>
			<td class="leftTD">身份证号:</td>
			<td class="rightTD2">
				<s:property value="#request.admin.adminIdentity"/>
				<input id="sfzNO" name="sfzNO" type="hidden" value='<s:property value="#request.admin.adminIdentity"/>'/>
		    </td>
			
		</tr>
		<tr>
			<td class="leftTD2">性别:</td>
			<td class="rightTD">
				<select id="adminGender" name="adminGender" style="width:40%;">
					<s:if test="#request.admin.adminGender == 1">
						 <option value="0" >请选择</option>
						 <option value="1" selected="selected">男</option>
						 <option value="2" >女</option>
					</s:if>
					<s:else>
						<option value="0" >请选择</option>
						<option value="1" >男</option>
						<option value="2" selected="selected">女</option>
					</s:else>
				</select><font color="red">*</font>	
			</td>
		</tr>
		<tr>
			<td class="leftTD">民族:</td>
		    <td>
		       <select id="adminNationality" name="adminNationality" style="width:40%;">
					<s:iterator value="nationality.collection">
					   <s:if test="id == #request.admin.adminNationality">
					   <option value="<s:property value='id' />" selected="selected"><s:property value='name' /></option>
					   </s:if>
						<s:else>
						  <option value="<s:property value='id' />" ><s:property value='name'/></option>
						</s:else>
					</s:iterator>
				</select>
			</td>
		</tr>
		<tr>
			<td class="leftTD2">负责管理党组织:</td>
			<td class="rightTD2" >
				<s:property value="#request.branchName"/>
			</td>
		</tr>
		<tr>
			<td class="leftTD">联系电话:</td>
			<td class="rightTD"><input id="telephone" name="telephone" type="text" value='<s:property value="#request.admin.adminTelephone"/>'/></td>
		</tr>
		<tr>
			<td class="leftTD2">电子邮箱:</td>
			<td class="rightTD"><input id="email" name="email" type="text" value='<s:property value="#request.admin.adminEmail"/>'/></td>
		</tr>
		</table>
		<div style="clear:both; height:5px;"></div>
		<div style="text-align:center; width:90%;">
			<input type="submit"  name="submit" id="submit" class="input-button" value="保存" />
			<input id="history" name="history" type="button" class="input-button" value="返回" onclick="window.location.href='javascript:history.go(-1);'"/>
		</div>
		</s:form>
	</div>
</div>